{{ $home     := site.BaseURL }}
{{ $logo     := site.Params.logos.navbar }}
{{ $allDocs  := where site.Sections ".Section" "docs" }}
{{ $latest   := site.Params.versions.latest }}
<nav class="navbar is-hidden-tablet">
  <div class="navbar-brand">
    <a class="navbar-item" href="{{ $home }}">
      <img src="{{ $logo }}">
    </a>

    <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="mobile-menu">
      <span aria-hidden="true"></span>
      <span aria-hidden="true"></span>
      <span aria-hidden="true"></span>
  </a>
  </div>

  <div class="navbar-menu" id="mobile-menu">
    <div class="navbar-end">
      <a class="navbar-item" href="{{ $home }}">
        Home
      </a>

      <a class="navbar-item" href="/docs/v{{ $latest }}">
        Docs home
      </a>

      <p class="navbar-item">
        Docs sections
      </p>

      {{ range $allDocs }}
      {{ range .Sections }}
      {{ range .Sections }}
      <a class="navbar-item is-indented is-small" href="{{ .RelPermalink }}">
        {{ .Title }}
      </a>
      {{ end }}
      {{ end }}
      {{ end }}
    </div>
  </div>
</nav>
